﻿<UserControl x:Class="BrainTechLLC.FolderExplorer.ShowFilesListView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:dragdrop="clr-namespace:DragDropLibrary;assembly=DragAndDrop"             
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Grid x:Name="topGrid">
        <ListView x:Name="listView2" BorderThickness="0" 
                  ItemsSource="{Binding Path=Files, Mode=OneWay}" Tag="{Binding}"
                  TextBlock.FontSize="9"
                  SelectionMode="Extended" PreviewMouseRightButtonDown="listView2_PreviewMouseRightButtonDown"
                  dragdrop:DragAndDrop.RegisterDragSourceName="SelectedFiles" dragdrop:DragAndDrop.RegisterDropTargetName="FileListView">
            <ListView.ContextMenu>
                <ContextMenu x:Name="contextMenu">
                    <MenuItem x:Name="mnuOpen" Header="Open _File" Click="mnuOpen_Click"/>
                    <MenuItem x:Name="mnuOpenContaining" Header="Open _Containing Folder" Click="mnuOpenContaining_Click"/>
                </ContextMenu>
            </ListView.ContextMenu>
            <ListView.View>
                <GridView>                    
                    <GridViewColumn Header="File Name" Width="300">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <TextBlock VerticalAlignment="Center" Text="{Binding Name}"/>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                    <GridViewColumn DisplayMemberBinding="{Binding FileDate}" Header="File Date" Width="140"/>
                    <GridViewColumn DisplayMemberBinding="{Binding FileSize}" Header="Size (KB)" Width="150"/>
                </GridView>
            </ListView.View>
        </ListView>
    </Grid>
</UserControl>
